package com.zoroki.hmusic.service;

import com.zoroki.hmusic.entity.Playlist;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.domain.Page;
import org.springframework.data.elasticsearch.core.SearchHits;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zoroki
 * @since 2023-05-10
 */
public interface IPlaylistService extends IService<Playlist> {

    List<Playlist> findPlaylistByUserId(int userId);

    int addPlaylist(Playlist playlist);


    Playlist findPlaylistById(int id);

    int deletePlaylistById(int id);

    SearchHits<Playlist> findPlaylistByKeyword(String keyword);

    Page<Playlist> getPlaylistPageByKeyword(String keyword, int pageIndex);

    int updatePlaylist(Playlist playlist);

    Playlist findPlaylistByIdAndUserId(int id, int userId);
}
